package game;

import game.gui.GameMainGUI;

import org.eclipse.swt.widgets.Display;

public enum MapShareMain {
	LAUNCHER,
	ADMIN_PANEL,
	GAME_MAIN;

	private static Display display = Display.getDefault();
	private static MapShareWindow activeWindow;
	public static Game game = new Game(new Player("Seth"));
	
	public static String[] version = {
		"0.0.0.0"
	};
	
	public static void main(String[] args) {
		
		setNewActiveWindow(GAME_MAIN);
		
		while (!activeWindow.getMainShell().isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
	
	public static void setNewActiveWindow(MapShareMain nextWindow, Object ...args){
		switch (nextWindow) {
		case LAUNCHER:
//			activeWindow = new LauncherGUI();
			break;
		case ADMIN_PANEL:
//			activeWindow = new AdminPanelGUI();
			break;
		case GAME_MAIN:
			activeWindow = new GameMainGUI(game);			
			break;
		default:
			break;
		}
	}
}
